import subprocess,hashlib

def diff_md5(file1,file2):
    def chick_md5(file):
        md5 = hashlib.md5()
        with open(file, 'rb') as f:
            while True:
                # for line in f:
                #     content+=f.readline()
                content = f.read(8192)
                print(type(content))
                if content:
                    md5.update(content)
                else:
                    break
        return md5.hexdigest()
    return chick_md5(file1) == chick_md5(file2)


res=diff_md5(r'E:\Ftp_system_v0.1\core\test.py',r'E:\Ftp_system_v0.1\db\test.py')
print(res)




